package service.impl;


import dao.VenderMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import pojo.Page;
import pojo.Vender;
import service.VenderService;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author Admin
 * @date 2022/11/18 18:36
 * @Description TODO
 * @Version 1.0
 **/
@Service
public class VenderServiceImpl implements VenderService {
    @Resource
    private VenderMapper venderMapper;
    //模糊查询
    @Override
    public int getCount(Page<Vender> page,Vender vender) {
        return venderMapper.getCount(page, vender);
    }
    //分页查询
    @Override
    public List<Vender> venderAllByPage(Page<Vender> page, Vender vender) {
        return venderMapper.venderAllByPage(page, vender);
    }
    @Transactional(propagation = Propagation.REQUIRED)
    @Override
    public int AddVender(Vender vender) {
        return venderMapper.AddVender(vender);
    }
    @Transactional(propagation = Propagation.REQUIRED)
    @Override
    public int UpdateVender(Vender vender) {
        return venderMapper.UpdateVender(vender);
    }
    @Transactional(propagation = Propagation.REQUIRED)
    @Override
    public int DelVender(String venderCode) {
        int i = venderMapper.DelVender(venderCode);
        return i;
    }


    @Override
    public int getCount(Vender vender) {
        return 0;
    }

    @Override
    public List<Vender> getAllByPage(Page<Vender> p, Vender vender) {
        return null;
    }

    @Override
    public void add(Vender vender) {

    }

    @Override
    public void del(Vender vender) {

    }

    @Override
    public void update(Vender vender) {

    }

    @Override
    public List<Vender> getAll() {
        return venderMapper.getAll();
    }

    @Override
    public List<Vender> getAll1() {
        return null;
    }
}
